package org.pyq.agent;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author pengYongQiang
 * @date 2021/12/21 10:23
 */
@Configuration
public class Config implements WebMvcConfigurer {

    @Autowired
    private AccessInterceptor accessInterceptor;

    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(accessInterceptor).addPathPatterns("/**");
    }
}
